﻿using System;
namespace Rocket.Core
{
    public interface IRepository<DTO>
        where DTO: class
    {
        void Add(DTO entity);
        long Count();
        long Count(System.Linq.Expressions.Expression<Func<DTO, bool>> whereCondition);
        void Delete(DTO entity);
        void DeleteAll();
        System.Collections.Generic.IList<DTO> GetAll();
        System.Collections.Generic.IList<DTO> GetAll(System.Linq.Expressions.Expression<Func<DTO, bool>> whereCondition);
        System.Linq.IQueryable<DTO> GetQueryable();
        DTO GetSingle(System.Linq.Expressions.Expression<Func<DTO, bool>> whereCondition);
        void Update(DTO entity);
        IRepository<DTO> CreateNew();
    }
}
